<template>
  <div class="form-container">

    <el-table :data="list" v-loading="loading">

      <el-table-column label="成员姓名" align="center" prop="name" />
      <el-table-column label="手机号码" align="center" prop="phone" />
      <el-table-column label="部门" align="center" prop="dept_name" />

      <el-table-column label="角色" align="center" prop="sourceName" />

      <el-table-column label="业绩比例" align="center" prop="rate" />
      <el-table-column label="服务日期" align="center" prop="createTime" width="200">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
        </template>
      </el-table-column>
    </el-table>

    <pagination v-show="total > 0" :total="total" :page.sync="pageNum" :limit.sync="pageSize"
      @pagination="getList" />

  </div>
</template>

<script>
export default {
  data() {
    return {
      pageNum: 1,
      pageSize: 10,
    }
  },
  name: 'teamList',
  props: {
    /* 编辑器的内容 */
    list: {
      type: Array,
      default: [],
    },
    loading: {
      type: Boolean,
      default: true,
    },
    total: {
      type: Number,
      default: 0,
    },

  },
  methods: {
    getList() {
    this.$emit('pageChange')
  },
  },

  computed: {

  }
}
</script>
